package com.viknix.threadpool.manager.client.filter;

import com.viknix.threadpool.manager.client.exception.TpmProcessException;

/**
 * @Author: Dongqi
 * @Date: 2021/11/24 20:38
 * @Version 1.0
 * @Description:
 */
public interface IConfigFilter {

    /**
     * Init
     *
     * @param filterConfig Filter Config
     */
    void init(IFilterConfig filterConfig);

    /**
     * do filter
     *
     * @param request     request
     * @param response    response
     * @param filterChain filter Chain
     * @throws TpmProcessException exception
     */
    void doFilter(IConfigRequest request, IConfigResponse response, IConfigFilterChain filterChain)
            throws TpmProcessException;

    /**
     * deploy
     */
    void deploy();

    /**
     * Get order
     *
     * @return order number
     */
    int getOrder();

    /**
     * Get filterName
     *
     * @return filter name
     */
    String getFilterName();
}
